//package com.example.Interceptor;
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//// 注册拦截器到Spring MVC配置中
//@Configuration
//@Slf4j
//public class WebConfig implements WebMvcConfigurer {
//
//    @Autowired
//    private JWTAuthorizationInterceptor jwtAuthorizationInterceptor;
//
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        log.info("开始注册自定义拦截器...");
//        registry.addInterceptor(jwtAuthorizationInterceptor)
//                .addPathPatterns("/users/**") // 匹配所有路径，根据实际需求可自定义匹配规则
//                .excludePathPatterns("/users/login"); // 排除无需验证Token的路径
//    }
//}
